import { View } from "@tarojs/components";
import UserTag from "../user/UserTag";
import ShowUserInfo from "../user/ShowUserInfo";
import { Popup } from "@taroify/core";
import { useState } from "react";

export default () => {
  const user = {
    avatar: "http://127.0.0.1:9999/statics/admin.jpg",
    username: "瑶瑶混日子",
    kid: "1864273892504383489",
    email: "3034221968@qq.com",
    phone: "17508561337",
    address: "局域网",
    sex: "2",
    ipAddr: "192.168.1.11",
    blackGround: "http://localhost:9999/statics/background/back.jpg",
    password: "1d9751757881f4c3fd1f840eccc532d4",
  };
  const [open, setOpen] = useState(false);
  return (
    <View>
      <UserTag size="medium" data={user} comment />
      <View className="ml-14 text-xs ">
        <View>屁大个事。大师，我写了一个论文，把你列了一作，已经发表了，</View>
        <View className="text-[20px] text-gray-400 flex gap-2 my-1">
          <View>17小时前</View>
          <View>局域网</View>
        </View>
        <View className="bg-[#F7F7F9] flex flex-col gap-2 p-2 rounded-lg">
          <View className="flex gap-1">
            <ShowUserInfo username={user.username} userID={user.kid} showName />
            <View>:</View>
            <View>读者最新一期香菱广济自己翻</View>
          </View>
          <View className="flex gap-1">
            <ShowUserInfo username={user.username} userID={user.kid} showName />
            <View>:</View>
            <View>读者最新一期香菱广济自己翻</View>
          </View>
          <View className="flex gap-1">
            <ShowUserInfo username={user.username} userID={user.kid} showName />
            <View>:</View>
            <View>读者最新一期香菱广济自己翻</View>
          </View>
          <View onClick={() => setOpen(true)} className="text-[#6E85BD]">
            查看更多3条评论
          </View>
        </View>
      </View>
      <Popup
        rounded
        lock
        open={open}
        placement="bottom"
        style={{ height: "80%" }}
        onClose={() => setOpen(false)}
      >
        <Popup.Close />
        <View className="flex justify-center items-center">3条回复</View>
      </Popup>
    </View>
  );
};
